package felix.things.router.modbus.config;

import felix.things.router.modbus.transport.RtuTransportConfiguration;
import felix.things.router.modbus.transport.TcpTransportConfiguration;
import felix.things.router.modbus.transport.UdpTransportConfiguration;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author Felix
 * @date 2019/10/31
 **/
@Data
@Component
@ConfigurationProperties(prefix = "modbus.config.transport", ignoreInvalidFields = true)
public class TransportConfig {
    private Map<String, TcpTransportConfiguration> tcp;
    private Map<String, UdpTransportConfiguration> udp;
    private Map<String, RtuTransportConfiguration> rtu;
}
